﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Class="Sinacor.OMM.Deployment.Extractor.Extrator"
	x:Name="ExtratorScreen"
	Title="Extrator"
	Width="800" 
	Height="600" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	mc:Ignorable="d" Closing="ExtratorScreen_Closing">

    <Window.Resources>
        <Storyboard x:Key="Loader01" RepeatBehavior="Forever" >
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" 
                                                                                                                                                                Storyboard.TargetName="loader01" 
                                                                                                                                                                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:01" 
                                                                                                                                               Value="5.172"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" 
                                                                                                                                                                Storyboard.TargetName="loader01" 
                                                                                                                                                                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:01" 
                                                                                                                                               Value="-5.172"/>
            </DoubleAnimationUsingKeyFrames>
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" 
                                                                                                                                                               Storyboard.TargetName="loader01" 
                                                                                                                                                               Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                <SplineColorKeyFrame KeyTime="00:00:01" 
                                                                                                                                              Value="#00FFFFFF"/>
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
    </Window.Resources>
    <Window.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource Loader01}"/>
        </EventTrigger>
    </Window.Triggers>



    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <ImageBrush ImageSource=".\images\setupTelas.png" Opacity="1"/>
        </Grid.Background>
        <Grid Margin="221,14,0,0" VerticalAlignment="Top" 
                                                 Width="348" 
                                                 Height="82" 
                                                 HorizontalAlignment="Left">
            <Grid.Background >
                <ImageBrush ImageSource=".\images\LogoSinacor.png" 
                                                                                                              Opacity="1" 
                                                                                                              Stretch="UniformToFill"/>
            </Grid.Background>
        </Grid>
        <TextBlock Margin="8,115,8,0" 
                                                                  TextWrapping="Wrap" 
                                                                  Height="110" 
                                                                  VerticalAlignment="Top" 
                                                                  TextAlignment="Justify">
                                               <Run Text="Este extrator irá copiar para um diretório local todos os arquivos necessários para a instalação e manutenção dos componentes OMM - Order Message Manager."/>
                                               <LineBreak/>
                                               <Run Text=""/>
                                               <LineBreak/>
                                               <Run Text="Após a extração dos arquivos, o Setup de instalação dos componentes será executado automaticamente. "/>
        </TextBlock>
        <Label HorizontalAlignment="Left" 
                                                  Margin="8,217,0,0" 
                                                  VerticalAlignment="Top" 
                                                  Content="Diretório para extração dos Arquivos:" 
                                                  Width="192" d:LayoutOverrides="VerticalAlignment"/>
        <TextBox HorizontalAlignment="Left" 
                                                                Margin="204,221,0,0" 
                                                                VerticalAlignment="Top" 
                                                                Width="377.133" 
                                                                Text="" 
                                                                TextWrapping="Wrap" IsEnabled="False" Name="txtDirectory"/>
        <Button HorizontalAlignment="Left" 
                                                               Background="#FF2B4D83"
                                                               Margin="585,220,0,0" 
                                                               VerticalAlignment="Top" 
                                                               Content="Buscar" Name="btnSearchDirectory" Click="btnSearchDirectory_Click" Foreground="#FFFFFFFF"/>

        <Button HorizontalAlignment="Left"
                                                               Background="#FF2B4D83" 
                                                               Margin="628.34,220,0,0" 
                                                               VerticalAlignment="Top" 
                                                               Content="Extrair" Name="btnExtractDirectory" GotFocus="btnExtractDirectory_GotFocus" Foreground="#FFFFFFFF" Visibility="Hidden" />

        <Label HorizontalAlignment="Left" 
                                                  Margin="700,267,0,0" 
                                                  VerticalAlignment="Top" Content="Extraindo Arquivos..."                                        
                                                  Width="192" Name="lblExtractingFiles" Visibility="Hidden" />
        <Grid Margin="167.5,352,0,0" 
                                                 VerticalAlignment="Top" 
                                                 Width="457" 
                                                 Height="219" 
                                                 HorizontalAlignment="Left" d:LayoutOverrides="Width">
            <Grid.Background >
                <ImageBrush ImageSource=".\images\Extrator.png" 
                                                                                                              Opacity="1" 
                                                                                                              Stretch="UniformToFill"/>
            </Grid.Background>
        </Grid>
        <Ellipse HorizontalAlignment="Left" 
                                                                                              Margin="184,278,0,279.446" 
                                                                                              Width="4.554" 
                                                                                              Fill="#FF336699" 
                                                                                              Stroke="{x:Null}" 
                                                                                              StrokeThickness="3" 
                                                                                              x:Name="loader01" 
                                                                                              Visibility="Hidden"
                                                                                              RenderTransformOrigin="0.5,0.5">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="1" 
                                                                                                                                             ScaleY="-1"/>
                    <SkewTransform AngleX="0" 
                                                                                                                                             AngleY="0"/>
                    <RotateTransform Angle="0"/>
                    <TranslateTransform X="0" 
                                                                                                                                             Y="0"/>
                </TransformGroup>
            </Ellipse.RenderTransform>
        </Ellipse>
        <Label 
                                                                                              Content="Extraindo os arquivos de Setup..." 
                                                                                              Margin="204,267,0,0" 
                                                                                              Foreground="#FF666666" 
                                                                                              x:Name="LblExtraindo" d:LayoutOverrides="Height" Visibility="Hidden" HorizontalAlignment="Left" Width="193" Height="22.277" VerticalAlignment="Top" />
        <Label Content="Não foi possível extrair os arquivos. Verifique se não existe nenhum processo OMM em execução." 
                                                                                              Margin="204,267,0,0" 
               
                                                                                              Foreground="#FFD13E3E" 
                                                                                              Visibility="Hidden" 
                                                                                              x:Name="LblErroExtraindo" d:LayoutOverrides="Height" HorizontalAlignment="Left" Width="485" Height="22" VerticalAlignment="Top" />        

    </Grid>





</Window>










